navigationGo.pngQuick Navigation
allprojects32.pngAll projects
hardware32.pngHardware
links32.pngLinks

favoriteStar32.pngTop projects
Alan numitron clock
Clapclap 2313/1386
SNES Pi Webserver
USB Volume/USB toys
Smokey amp
Laser cutter
WordClock
ardReveil v3
SNES Arcade cabinet
Game boy projects
cameleon
Home Presence Detector

github32.pngGitHub
AlanFromJapan

navigationMail.pngContact me

alanfjmail.png
3flags.pngWho's Alan?


Akizukidenshi
Elec-lab
Rand Nerd Tut
EEVblog
SpritesMods
AvrFreaks
Gameboy Dev
FLOZz' blog
Switch-science
Sparkfun
Suzusho
Datasheet Lib
Reddit Elec
Ermicro
Carnet du maker (fr)

usb smart switch

Last update: Thu Jun 5 22:25:41 2025
Often when developping USB gadget, you code, upload, unplug it, plug it again so it is detected as USB (because the power source was my PC USB), rince and repeat. In fact it would be more practical to be able to easily switch "charge only" to/from "USB data" connection. And since in this early 2019 I could use a little practice to get back on track, let's do this.

Presentation

Principle

Points of interrest

Implementation

Bill of materials

Schematics

Source code

Pictures

Links

Helpful sources

Inspiration

All content on this site is shared under the MIT licence (do what u want, don't sue me, hat tip appreciated)
electrogeek.tokyo ~ Formerly known as Kalshagar.wikispaces.com and electrogeek.cc (AlanFromJapan [2009 - 2025])